package tk.heimashuma.store.utils;


public class SendMail implements Runnable {
	private String email;
	private String msg;
	private String subject;
	public SendMail(String email, String msg,String subject) {
		super();
		this.email = email;
		this.msg = msg;
		this.subject =subject;
	}
	@Override
	public void run() {
		MailUtils mail = new MailUtils(false);
		mail.initMessage();
		try {
			mail.setRecipient(email);
			mail.setFrom("....");
			mail.setText(msg);
			mail.setSubject(subject);
			mail.sendMessage();
		} catch (Exception e) {
			System.out.println("发邮件出现异常，电子邮件不存在");
		}
	}

}
